//
//  MahjongTypeCollectionViewCell.m
//  Mahjong
//
//  Created by 饶首建 on 17/5/16.
//  Copyright © 2017年 com.ikamobile.com. All rights reserved.
//

#import "MahjongTypeCollectionViewCell.h"

@implementation MahjongTypeCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.layer.cornerRadius =  10.f;//self.frame.size.width/2;
        self.layer.masksToBounds = YES;
//        self.layer.borderWidth = 1;
//        self.layer.borderColor = [UIColor lightGrayColor].CGColor;
        
        float w = self.frame.size.width;
        float h = self.frame.size.height;
        
        self.backgroundColor = UIColorHex(EAEAEA);

        _titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, w, h)];
        _titleLabel.textAlignment = NSTextAlignmentCenter;
        _titleLabel.font = [UIFont systemFontOfSize:25];
        _titleLabel.textColor = [UIColor whiteColor];
//        _titleLabel.text = @"测试文字到底有多出";
        _titleLabel.adjustsFontSizeToFitWidth = YES;
        [self addSubview:_titleLabel];
    }
    return self;
}


@end
